package club.chenlinghong.product.exception;

import club.chenlinghong.product.entity.ProductInfo;
import club.chenlinghong.product.enums.ResultEnum;

/**
 * @Description TODO
 * @Author chenlinghong
 * @Date 2019/7/1 17:29
 * @Version V1.0
 */
public class ProductException extends RuntimeException {

    private Integer code;

    public ProductException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }
}
